package atm.zhaz;

import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextField;

public class OneFieldForm extends SmallWindow implements ActionListener {
	JTextField login1;

	public OneFieldForm(String title, String first) {
		setTitle(title);

		JLabel wel = new JLabel(title);
		Font a = new Font("Times New Roman", Font.BOLD, 24);
		wel.setFont(a);
		wel.setForeground(Color.BLACK);
		wel.setBounds(130, 30, 250, 30);
		add(wel);

		JLabel login = new JLabel(first);
		Font aa = new Font("Times New Roman", Font.BOLD, 20);
		login.setFont(aa);
		login.setForeground(Color.BLACK);
		login.setBounds(50, 70, 250, 20);
		add(login);

		login1 = new JTextField();
		login1.setBounds(160, 70, 130, 20);
		login1.setForeground(Color.black);
		add(login1);

		JButton ok = new JButton("OKoy");
		ok.setBounds(215, 150, 70, 20);
		add(ok);
		ok.addActionListener(this);
	}

	public String getLogin1() {
		return login1.getText();
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		setVisible(false);
	}


}
